﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EQual.MainModule.Employees.Views;

namespace EQual.MainModule.Employees.Models
{
    public class EmployeesPresentationModel : EQual.Infrastructure.MVPFramework .Models .PresentationModelBase<DataAccesLayer .Employee >,IEmployeesPresentationModel 
    {
        IEmployeeGridView _view;

        public  IEmployeeGridView View
        {
            get { return _view; }
            set { _view = value; }
        }

        protected override void CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove)
            {

            }

            base.CollectionChanged(sender, e);
        }

        protected override IEnumerable<DataAccesLayer.Employee> GetCollection()
        {
            return new DataAccesLayer.EQualDataLayerFactory().GetEmployeeAccesLayer().GetEmployees ();
        }


    }
}
